<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('学生基本信息列表')" />
</head>
<body>
     <div class="container-div">
        <div class="row">
     <div class="col-sm-9 about">
         <div class="ibox float-e-margins">
             <div class="ibox-title ibox-title-gray dashboard-header">
                 <h5>学生基本信息</h5>
             </div>
             <div class="ibox-content">
                 <div class="nav-tabs-custom">
                     <ul class="nav nav-tabs">
                         <li class="active"><a href="#student_info" data-toggle="tab" aria-expanded="true">基本资料</a></li>
                     </ul>
                     <div class="tab-content">
                         <!--用户信息-->
                         <div class="tab-pane active" id="student_info">
                             <form class="form-horizontal m" id="formId" th:object="${jibenstudents}">
                                 <!--隐藏ID-->
                                 <input name="id"  type="hidden">
                                 <div class="col-md-12">
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label">身份证：</label>
                                         <div class="col-sm-9">
                                             <input type="text" name="card" class="form-control" placeholder="请输入身份证">
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label">学生姓名：</label>
                                         <div class="col-sm-9">
                                             <input type="text" name="name" class="form-control" placeholder="请输入学生姓名">
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label">学生性别：</label>
                                         <div class="col-sm-9">
                                             <textarea type="text" name="sex" class="form-control" placeholder="请输入学生性别"></textarea>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">出生日期：</label>
                                         <div class="col-sm-8">
                                             <div class="input-group date">
                                                 <input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                                                 <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                             </div>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">毕业学校：</label>
                                         <div class="col-sm-8">
                                             <input name="school" class="form-control" type="text" required>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">专业：</label>
                                         <div class="col-sm-8">
                                             <input name="profession" class="form-control" type="text" required>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">学历：</label>
                                         <div class="col-sm-8">
                                             <select name="education" class="form-control m-b" th:with="type=${@dict.getType('sys_education')}" required>
                                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                             </select>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">籍贯：</label>
                                         <div class="col-sm-8">
                                             <input name="place" class="form-control" type="text" required>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">毕业时间：</label>
                                         <div class="col-sm-8">
                                             <div class="input-group date">
                                                 <input name="time" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                                                 <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                             </div>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">电话：</label>
                                         <div class="col-sm-8">
                                             <input name="number" class="form-control" type="text" required>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">邮箱：</label>
                                         <div class="col-sm-8">
                                             <input name="email" class="form-control" type="text" required>
                                         </div>
                                     </div>
                                     <div class="form-group">
                                         <label class="col-sm-3 control-label is-required">有效标记：</label>
                                         <div class="col-sm-8">
                                             <select name="sign" class="form-control m-b" th:with="type=${@dict.getType('sys_company_10')}" required>
                                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                             </select>
                                         </div>
                                     </div>
                                 </div>
                                 <div class="form-group">
                                     <div class="col-sm-offset-2 col-sm-10" id="toolbar">
                                         <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="rgpp:informationcompany:add">
                                             <i class="fa fa-plus"></i> 添加
                                         </a>
                                         <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="rgpp:informationcompany:edit">
                                             <i class="fa fa-edit"></i> 修改
                                         </a>
                                         <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="rgpp:informationcompany:export">
                                             <i class="fa fa-download"></i> 导出
                                         </a>
                                     </div>
                                 </div>
                             </form>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
     </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('rgpp:informationstudents:edit')}]];
        var removeFlag = [[${@permission.hasPermi('rgpp:informationstudents:remove')}]];
        var sexDatas = [[${@dict.getType('sys_user_sex')}]];
        var educationDatas = [[${@dict.getType('sys_education')}]];
        var signDatas = [[${@dict.getType('sys_students_10')}]];
        var prefix = ctx + "rgpp/informationstudents";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "学生基本信息",
                clickToSelect: true,//点击row任意位置选中复选框
                rememberSelected: true,//记住翻页选择
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '编号',
                    visible: false
                },
                {
                    field: 'card',
                    title: '身份证或企业代码'
                },
                {
                    field: 'name',
                    title: '姓名'
                },
                {
                    field: 'birthday',
                    title: '出生日期'
                },
                {
                    field: 'school',
                    title: '毕业学校'
                },
                {
                    field: 'profession',
                    title: '专业'
                },
                {
                    field: 'education',
                    title: '学历',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(educationDatas, value);
                    }
                },
                {
                    field: 'place',
                    title: '籍贯'
                },
                {
                    field: 'time',
                    title: '毕业时间',
                    sortable:true
                },
                {
                    field: 'number',
                    title: '电话'
                },
                {
                    field: 'email',
                    title: '邮箱'
                },
                {
                    field: 'sign',
                    title: '有效标记，现在有用就是1现在无用就是0',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(signDatas, value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return $.table.dropdownToggle(actions.join(''));
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>